{extend name="../../public/admin"}
{block name="title"}{:lang('添加土建')}{/block}
{block name="css"}

<script src="__PUBLIC__/public/validform/Validform_v5.3.2_min.js"></script>
<link rel="stylesheet" href="__PUBLIC__/public/validform/style.css">
<!--图片-->
<link rel="stylesheet" href="__PUBLIC__/public/bian-ji-qi/themes/default/default.css"/>
<script src="__PUBLIC__/public/bian-ji-qi/kindeditor.js"></script>
<script src="__PUBLIC__/public/bian-ji-qi/lang/zh_CN.js"></script>
<script>
    KindEditor.ready(function (K) {
        var editor = K.editor({
            allowFileManager: true
        });

        K('#image3').click(function () {
            editor.loadPlugin('image', function () {
                editor.plugin.imageDialog({
                    showRemote: false,
                    imageUrl: K('#url3').val(),
                    clickFn: function (url, title, width, height, border, align) {
                        K('#url3').val(url);
                        editor.hideDialog();
                    }
                });
            });
        });
        K('#image4').click(function () {
            editor.loadPlugin('image', function () {
                editor.plugin.imageDialog({
                    showRemote: false,
                    imageUrl: K('#url4').val(),
                    clickFn: function (url, title, width, height, border, align) {
                        K('#url4').val(url);
                        editor.hideDialog();
                    }
                });
            });
        });
    });

</script>
{/block}
{block name="body"}

<div id="container">
    <ul class="nav nav-tabs">
        <li class="active"><a href="javascript:;">完善资料</a></li>
    </ul>

    <div style="height: 20px;"></div>
    <div>
        <form action="{:url('rmb_info',['id'=>0])}" method="post" id="form0" enctype="multipart/form-data">
            <input type="hidden" name="id" value="{$Request.param.id}">
            <div class="row">
                {eq name="$data.user_name" value=""}
                <div class="pull-left col-xs-4">
                    <div class="form-group input-group   select-right">
                        <label class="input-group-addon">施工企业</label>
                        <input type="text" name="user_name" class="form-control" datatype="s1-30">
                    </div>
                    <div class="form-group input-group   select-right">
                        <label class="input-group-addon">固定电话</label>
                        <input type="text" name="mobile" class="form-control" datatype="s5-20">
                    </div>
                    <div class="form-group input-group  select-right">
                        <label class="input-group-addon">企业法人</label>
                        <input type="text" name="user_representative" class="form-control" datatype="s1-30">
                    </div>
                    <div class="form-group input-group  select-right ">
                        <label class="input-group-addon">联系方式</label>
                        <input type="text" name="user_representative_mobile" class="form-control" datatype="s5-20">
                    </div>
                    <div class="form-group input-group  select-right">
                        <label class="input-group-addon">项目经理</label>
                        <input type="text" name="manager" class="form-control" datatype="s1-20">
                    </div>
                    <div class="form-group input-group  select-right ">
                        <label class="input-group-addon">证件号码</label>
                        <input type="text" name="certificates" class="form-control" datatype="s5-40">
                    </div>
                </div>
                <div class="pull-left col-xs-4">


                    <div class="form-group input-group  select-right">
                        <label class="input-group-addon">联系方式</label>
                        <input type="text" name="certificates_mobile1" class="form-control" datatype="s5-20">
                    </div>
                    <div class="form-group input-group  select-right">
                        <label class="input-group-addon">联系方式</label>
                        <input type="text" name="certificates_mobile2" class="form-control" datatype="s5-20">
                    </div>
                {else/}
                    <div class="pull-left col-xs-4">
                        <div class="form-group input-group   select-right">
                            <label class="input-group-addon">施工企业</label>
                            <input type="text" name="user_name" class="form-control display" onfocus="this.blur()" datatype="s1-30" value="{$data.user_name}">
                        </div>
                        <div class="form-group input-group   select-right">
                            <label class="input-group-addon">固定电话</label>
                            <input type="text" name="mobile" class="form-control" onfocus="this.blur()" datatype="s5-20" value="{$data.mobile}">
                        </div>
                        <div class="form-group input-group  select-right">
                            <label class="input-group-addon">企业法人</label>
                            <input type="text" name="user_representative" onfocus="this.blur()" class="form-control" value="{$data.user_representative}" datatype="s1-30">
                        </div>
                        <div class="form-group input-group  select-right ">
                            <label class="input-group-addon">联系方式</label>
                            <input type="text" name="user_representative_mobile" onfocus="this.blur()" value="{$data.user_representative_mobile}" class="form-control" datatype="s5-20">
                        </div>
                        <div class="form-group input-group  select-right">
                            <label class="input-group-addon">项目经理</label>
                            <input type="text" name="manager" class="form-control" value="{$data.manager}" onfocus="this.blur()" datatype="s1-20">
                        </div>
                        <div class="form-group input-group  select-right ">
                            <label class="input-group-addon">证件号码</label>
                            <input type="text" name="certificates" onfocus="this.blur()" value="{$data.certificates}" class="form-control" datatype="s5-40">
                        </div>
                    </div>
                    <div class="pull-left col-xs-4">




                    <div class="form-group input-group  select-right">
                        <label class="input-group-addon">联系方式</label>
                        <input type="text" name="certificates_mobile1" class="form-control" value="{$data.certificates_mobile1}" onfocus="this.blur()" datatype="s5-20">
                    </div>
                    <div class="form-group input-group  select-right">
                        <label class="input-group-addon">联系方式</label>
                        <input type="text" name="certificates_mobile2" class="form-control" value="{$data.certificates_mobile2}" onfocus="this.blur()" datatype="s5-20">
                    </div>
                        <small class="text-success">提示：只能修改下面的</small>
                  {/eq}

                    <div class="form-group input-group  select-right">
                        <label class="input-group-addon">中标金额</label>
                        <input type="text" name="budgetary_price" class="form-control"  value="{$data.budgetary_price}">
                    </div>
                        <small class="text-info">中标金额图</small>
                    <div class="form-group input-group  select-right">

                        <input type="text" name="budgetary_price_img" id="url3" class="form-control"  value="{$data.budgetary_price_img}">
                        <label class="input-group-addon" id="image3">上传</label>
                    </div>
                    <div class="form-group input-group  select-right">
                        <label class="input-group-addon">决算金额</label>
                        <input type="text" name="determine_mobile" class="form-control"  value="{$data.determine_mobile}">
                    </div>
                        <small class="text-info">决算金额图</small>
                    <div class="form-group input-group  select-right">
                        <input type="text" name="determine_mobile_img" id="url4" class="form-control" value="{$data.determine_mobile_img}">
                        <label class="input-group-addon" id="image4">上传</label>
                    </div>
                </div>
            </div>

            <div class="form-group  text-center col-xs-8">
                <button class="btn btn-info" id="html">{:lang('立即提交')}</button>
            </div>
        </form>

    </div>

</div>
{/block}
{block name="js"}
<!--日期-->
<link rel="stylesheet" href="__PUBLIC__/public/time/css/jedate.css">
<script src="__PUBLIC__/public/time/jquery.jedate.min.js"></script>

<script>
    (() => {

        //年份
        $("#date").jeDate({
            format: "YYYY"
        });
        //表单验证
        var form = $('form').Validform({
            tiptype: 4,
            ajaxPost: true,
            beforeSubmit: function () {

                    layer.load(2);


            },
            callback: function (da) {
                layer.closeAll();
                if (da == 1) {
                    form.resetForm();
                    window.parent.location.reload(); //子窗口 刷新父页面
                    layer.msg('{:lang("成功")}', {icon: 1});
                }
                else {
                    console.log(da);
                    layer.msg('{:lang("失败")}', {icon: 2});
                }
            }

        });

        //上传文件


    })();
</script>
{/block}